// 解决 CSS 全局作用域的问题
import styled from 'styled-components';
// 通过styled-components 引入图片。需要使用${}包裹
import logoPic from '../../statics/logo.png';

export const HeaderWrapper = styled.div`
    z-index:1;
    height:56px;
     position: relative;
     border-bottom: 1px solid #f0f0f0;
`
// export const Logo = styled.a.attrs({href:'/'})`
export const Logo = styled.div`
       height:56px;
       width:100px;
       position: absolute;
       left:0;
       top:0;
       display:block;
       background:url(${logoPic});
       background-size: contain;
`
export const Nav = styled.div`
       height:56px;
       width:960px;
       padding-right:30px;
        box-sizing: border-box;
        margin:0 auto;
`
export const NavItem = styled.div`
     line-height:56px;
     padding:0 15px;
     color:#333;
     font-size:17px;
     &.left{
     float:left;
     }
      &.right{
     float:right;
     color:#969696;
     }
     &.active{
     color:#ea6f5a;
     }
     
`
export const NavSearch = styled.input.attrs({placeholder:'搜索'})`
       width:160px;
       height:38px;
       font-size:14px;
       margin-top:9px;
       border-radius: 19px;
       padding: 0 30px 0 20px;
        box-sizing: border-box;
       outline: none;
       border: none;
        background:#eee;
        color:#666;
        margin-left:20px;
        &::placeholder{
            color:#999;
        }
        &.focused{
        width:240px;
        }
         &.slide-enter{
        transition:all 0.4s ease-in;
            }
        &.slide-enter-active{
        width:240px;
            }
        &.slide-exit{
        transition:all 0.4s ease-out;
            }
        &.slide-exit-active{
         width:160px;
            }
`
export  const SearchWrapper=styled.div`
    float:left;
    position: relative;
    .zoom{
         position: absolute;
         bottom:5px;
         right:5px;
         width:30px;
         line-height:30px;
         text-align:center;
         border-radius:50%;
     &.focused{
        color:#fff;
        background:#666;
        }
    }
`
export const SearchInfo=styled.div`
     position: absolute;
     left:0;
     top:56px;
     padding:0 20px ;
      box-sizing: border-box;
     width:240px;
     box-shadow: 0 0 8px rgba(0,0,0,.2);
     background:#fff;
`
export const SearchTitle=styled.div`
    font-size: 14px;
    color: #969696;
    margin-top: 20px;
    margin-bottom: 15px;
`
export const SearchInfoSwitch=styled.span`
   float:right;
   font-size:13px
   .spin{
   display:block;
   float:left;
    font-size: 12px;
    margin-right: 2px;
    transition: all .2s ease-in;
    transform-origin:center center ;
   }
`
export const SearchInfoList=styled.div`
    overflow: hidden;
`
export const SearchInfoItem=styled.a`
    display:block;
    font-size: 12px;
    color: #787878;
    border: 1px solid #ddd;
    border-radius: 3px;
    line-height:20px;
    border-radius: 3px;
    padding:0 5px;
    float:left;
    margin-right:10px;
    margin-bottom:15px;
`
export const AddTion=styled.div`
     position: absolute;
     top:0;
     right:0;
     height:56px;
`
export const Button=styled.div`
     height:38px;
     line-height:38px;
     margin-top:9px;
     margin-right:20px;
     float:right;
     font-size:14px;
     border-radius: 19px;
     border:1px solid #ea6f5a;
     padding:0 20px;
     &.reg{
        color:#ea6f5a;
     }
       &.writting{
        background:#ea6f5a;
        color:#fff;
     }
`

